<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>口味收藏</title>
    <link rel="stylesheet" href="../css/Favorites.css">
    <script src="../js/jquery-3.7.1.min.js"></script>
</head>
<body>
    <div class="all">
        <div class="head">
            <p><a href="DaDaMain.html"><img src="../image/返回.png" class="goback"></a>口味收藏</p>
        </div>
        <div class="lan">
            <p>共3个收藏</p>
        </div>
<div id="connection"></div>

<!--     <div class="shangping"> -->
<!--            <div class="picture"><img src="../image/奶茶4.jpg"></div>-->
<!--            <div class="neirong">-->
<!--                <p>莓莓奶麻薯</p>-->
<!--                <p class="ice">中、去冰、七分糖</p>-->
<!--               <p class="ices"><img src="../image/编辑.png">编辑</p>-->
<!--                <button onclick="location.href='Goods.html';" type="button" class="button" >喝一杯</button>-->
<!--            </div>-->
<!--       </div>-->

<!--       <div class="shangping">-->
<!--        <div class="picture"><img src="../image/云岭茉莉白2.png"></div>-->
<!--        <div class="neirong">-->
<!--            <p>云岭茉莉白</p>-->
<!--            <p class="ice">大、热、七分糖</p>-->
<!--           <p class="ice"><img src="../image/编辑.png">编辑</p>-->
<!--            <button onclick="location.href='Goods one.html';" type="button" class="button" >喝一杯</button>-->
<!--        </div>-->
<!--   </div>-->

<!--   <div class="shangping">-->
<!--    <div class="picture"><img src="../image/百香双重奏.png "></div>-->
<!--    <div class="neirong">-->
<!--        <p>百香双重奏</p>-->
<!--        <p class="ice">大、正常冰、七分糖</p>-->
<!--       <p class="ice"><img src="../image/编辑.png">编辑</p>-->
<!--        <button onclick="location.href='Goods two.html';" type="button" class="button" >喝一杯</button>-->
<!--    </div>-->
<!--      </div>-->
    </div>

</body>
<script>
    $(function(){
        $.ajax({
            url: '../getCollectInfoList',
            method: 'get',
            success: function (result){
                //渲染页面
                $.each(result, function(index, obj){
                    $('#connection').append(
                        `<div class="shangping" id="connection">`+
                         `<div class="picture"><img src="../image/${obj.collectImg} ">` +
                        `</div>`+
                         `<div class="neirong">` +
                        `<p>${obj.collectName}</p>` +
                        ` <p class="ice">${obj.collectPrice}</p>` +
                        `<p class="ice"><img src="../image/编辑.png">编辑</p>` +
                        `<button onClick="location.href='Goods two.html';" type="button" className="button" >喝一杯</button>`+
                         `</div>`+
                        `</div>`
                    );
                })
            }
        });
    })
</script>
</html>